package com.kxz.core.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kxz.core.dao.UserDao;
import com.kxz.core.po.User;
import com.kxz.core.service.UserService;

// UserService实现类
@Transactional
@Service("UserService")
public class UserServiceImpl implements UserService {
	// 注入UserDao
	@Autowired
	private UserDao userDao;

	@Override
	public User findUser(String usercode, String password) {
		User user = userDao.findUser(usercode, password);
		return user;
	}

	@Override
	public User findUsercode(String usercode) {
		// TODO Auto-generated method stub
		User user = userDao.findUsercode(usercode);
		return user;
	}

	@Override
	public void addUser(String usercode, String username, String password) {
		// TODO Auto-generated method stub
		this.userDao.addUser(usercode, username, password);
	}





	
	

}
